import 'package:bazi/page/calendar_widget.dart';
import 'package:bazi/page/hehun.dart';
import 'package:bazi/page/paipan_page.dart';
import 'package:bazi/util/paipan.dart';
import 'package:bazi/model/jieqi_model.dart';
import 'package:bazi/model/paipan_model.dart';
import 'package:bazi/model/sizhu_model.dart';
import 'package:bazi/util/my_color.dart';
import 'package:bazi/util/resurce.dart';
import 'package:bazi/widgets/title_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(primaryColor: MyColor.primaryColor),
      home: MyHomePage(title: ''),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      body: DefaultTabController(
        length: 3,
        child: Container(
          width: double.infinity,
          height: double.infinity,
          child: Column(
            children: [
              Container(
                height: 90,
                color: MyColor.primaryColor,
                child: SafeArea(
                  child: TabBar(
                      indicatorWeight: 0.00001,
                      tabs: [
                        Text("八字算命"),
                        Text("八字合婚"),
                        Text("姻缘测算"),
                      ]),
                ),
              ),
              Expanded(
                child: TabBarView(
                    children: [
                  PaiPanPage(),
                  HeHunPage(),
                  PaiPanPage(),
                ]),
              ),
            ],
          ),
        ),
      ),
      // This trailing comma makes auto-formatting nicer for build methods.
    );
  }

}
